The disclosure relates generally to video image processing and more particularly to methods and apparatus for reducing performance penalties in pipelined video encoder systems.
One goal of video encoding systems is to send video data as quickly as possible, thus minimizing the amount of delay between the encoding process and the reception of the video. One way of minimizing this delay is to attempt to increase network efficiency by placing as much video data as possible into each data packet, so as to minimize overhead data. For example, pipelined video encoding systems may attempt to pack as many encoded video macroblocks as possible into a video slice, up to any maximum slice size. A video slice may include any encoded group of one or more of macroblocks that on its own represents a spatially distinct area of a video frame. For example, a video slice may include one or more sequential macroblocks in a row of a video frame. The video slice may be grown by including additional sequential macroblocks from that video frame row, until the end of the video frame row is reached. If the video slice is desired to be larger, then macroblocks from the next row in the video frame, beginning with the macroblock at the beginning of the next row, for example, may be added. Typically, a pipelined video encoding system will blindly pack video macroblocks into a video slice until a macroblock overshoot occurs, such that the maximum allowed slice size has been reached and the video slice cannot accommodate the overshooting macroblock. Thus, in this situation, the overshooting macroblock may need to be re-encoded and then placed in the proceeding video slice.
At least one drawback with this approach, however, is that once an overshoot occurs network inefficiencies may be introduced. For example, a typical pipelined video encoder conforming to the H.264 standard will include various stages of encoding. These stages may include an inter-prediction stage and an entropy encoding stage. As defined in the H.264 standard, however, video slices do not allow for intra-prediction among macroblocks of different video slices. For example, the inter-prediction encoder may rely on macroblocks in the same video slice during prediction processing for a given macroblock, but may not rely on macroblocks in other video slices. Thus, once a macroblock overshoot occurs, macroblocks that have undergone inter-prediction encoding may need to be re-encoded because they will belong to a different video slice. A pipelined video encoder may re-encode macroblocks by flushing the data pipeline, and re-encoding the macroblocks into the data pipe. These and other processing techniques introduce encoding inefficiencies, causing a drop in encoding throughput.
Some video encoding methods, such as the one defined by the High Efficiency Video Coding (“HEVC”) standard, do allow intra-prediction between video slices by the use of the “dependent slice” video coding unit. Dependent slices were introduced into the HEVC standard mainly to reduce latency in the transmission of video data. For example, by allowing intra-prediction, data within video slices is potentially made available to a system sooner (e.g. with less latency) because the entire video slice does not have to be decoded for the data to be made available. However, although the use of dependent slices may reduce latency in a system, the problems relating to encoding throughput are not solved.